#include<bits/stdc++.h>
using namespace std;
const int N=1e5+5;
int n,p,all;
int r[N];
bitset<N>vis;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    all=n;
    for (int i=1;i<=n;i++){
        cin>>r[i];
    }
    sort(r+1,r+n+1);
    int i=1,j=2;
    while(i<j&&p!=all&&j<=n){
        if (r[i]>=r[j]){
            j++;
            continue;
        }
        if (r[i]<r[j]){
            vis[j]=1;
            all--;
            p++;
            if (vis[i])p--;
            i++;
            j++;
        }
    }
    cout<<all;
    return 0;
}